package main

import (
	"fmt"
	"google.golang.org/grpc"
	"log"
	"net"
	"qq_service/find_qq_by_qun/protobuf/pb"
	"qq_service/find_qq_by_qun/server"
)

func main() {

	listen, err := net.Listen("tcp", ":9003")
	if err != nil {
		fmt.Println("监听端口出现问题")
		log.Fatal(err)
	}

	s := grpc.NewServer()
	pb.RegisterFindQqByQunServiceServer(s, &server.QQbyQun{})

	err = s.Serve(listen)
	if err != nil {
		fmt.Println("QQ_by_qun 服务出现问题")
		log.Fatal(err)
	}
}
